Make file chooser saving work again
authorMatthias Clasen <mclasen@redhat.com>
Thu, 2 May 2019 01:08:21 +0000 (01:08 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 2 May 2019 01:41:23 +0000 (01:41 +0000)
I was a little overzealous when going
for the new default handling here. We
can't switch to gtk_widget_activate_default
before we actually handle the default.activate
action.

gtk/gtkfilechooserdialog.c

index de42a77c7081d0b2705cb6d82320faeac54f9fb7..5b92797905ebeb28809b17c56c8267180b8cc126 100644 (file)
@@ -395,9 +395,16 @@ static void
 file_chooser_widget_response_requested (GtkWidget            *widget,
                                         GtkFileChooserDialog *dialog)
 {
+  GtkWidget *button;
+
   dialog->priv->response_requested = TRUE;
 
-  gtk_widget_activate_default (widget);
+  button = get_accept_action_widget (GTK_DIALOG (dialog), TRUE);
+  if (button)
+    {
+      gtk_widget_activate (button);
+      return;
+    }
 
   dialog->priv->response_requested = FALSE;
 }